#ifndef __MAINWINDOW_H
#define __MAINWINDOW_H
#include "camera.h"
#include "keythread.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "i2cled.h"
#include "osa.h"
#include "check_udisk.h"
extern Save_Load m_save_load;

#define MEDIA_PIC               0
#define MEDIA_VIDEO             1
#define FILE_LIST_WIDTH         560
#define FILE_LIST_HEIGHT        40
#define PIC_VIEW_WIDTH          800//DISPLAY_WIDTH
#define PIC_VIEW_HEIGHT         SCREEN_HEIGHT
#define KEY_OK_VALUE            0b000010000
#if 0
        void Show_lode_file(QString dir);
        bool copyDirectoryFiles(const QString &fromDir, const QString &toDir, int days,bool coverFileIfExist);
        bool deleteDir(const QString &path);

        void play_media(QString file,int mode);
        void pic_select();
        void video_select();

        void play_pic();
        void play_video();
        void double_play(QListWidgetItem*Item);
        void delete_file();
        void fileview_back();
        void pic_front();
        void pic_stop();
        void pic_next();
        void pic_back();
        void get_selectfile(int currentRow);

        void file_manager();
        void backlight_set();
        void sleeptime_set();
        void adavance_set();
        void help();
        void set_back();
        void savepath_confirm();
        void copy_file();                   //复制文件到SD
        void copy_file_USB();               //复制文件到U盘
        void clear_file();
        void filemanager_back();
        void clearfile_confirm();
        void clearfile_cancel();


        void sleeptime_back();
        void on_save_code_clicked();
        void on_default_code_clicked();
        void on_delete_code_clicked();


        void chargemode_save();
        void theme_save();
        void again_changed(int value);
        void dgain_changed(int value);
        void exposure_changed(int value);
        void ispgain_changed(int value);
        void brightness_changed(int value);
        void constrast_changed(int value);
        void hue_changed(int value);
        void saturastion_changed(int value);
        void fice_close();
        void fice_open();
        void awbmode_save();
        void temperature_change(int value);
        void rgain_change(int value);
        void grgain_change(int value);
        void gbgain_change(int value);
        void bgain_change(int value);
        void sharpmode_save();
        void CB_sample_Changed(int index);
        void texturefreq_change(int value);
        void edgefreq_change(int value);
        void overshoot_change(int value);
        void undershoot_change(int value);
        void advanced_back();

        //add by Edwin start-----------------------------------------
        void LDCI_LPFSigma_change(int value);
        void LDCI_Blc_change(int value);
        void LDCI_posmean_change(int value);
        void LDCI_possigma_change(int value);
        void LDCI_poswgt_change(int value);
        void LDCI_negmean_change(int value);
        void LDCI_negsigma_change(int value);
        void LDCI_negwgt_change(int value);
        void setCamera_input_en(int index);

        void pushButton_beep_off();
        void pushButton_beep_on();


         //add by Edwin end-----------------------------------------

        void passwd_error();
        void help_back();
        void file_process();
        void file_process_udisk();

        void change_frame_size(int index);
        void change_camera_type(int index);
        void frame_setting_save();
        void image_setting_save();
        void on_chooseBox_size_2_currentIndexChanged(int index);
        void on_chooseBox_mask_2_currentIndexChanged(int index);
        void on_horizontalSlider_2_valueChanged(int value);
        void on_horizontalSlider_3_valueChanged(int value);
        void on_ButonHDMI_1080P_clicked();
        void on_ButonHDMI_720P_clicked();
        void on_colorsetsave_btn_clicked();
        void on_colorsetdefaut_btn_clicked();

        void dehaze_change();
        void denoise_change();
        void Set_AEmold_changed();
        void LDCImode_change(int);
        void LDCIen_change(int);
        void LDCI_enable();
        void LDCI_mode_change();
        void Set_AEmold_change(int index);

        void on_pushButton_3_clicked();
        void on_pushButton_2_clicked();


void ShowVideo(int fice);
void on_Btn_Ranse_clicked();
void on_Btn_bower_clicked();
void on_again_btn_valueChanged(int value);
void on_dgain_btn_valueChanged(int value);
void on_exposure_btn_valueChanged(int value);
void on_ispgain_btn_valueChanged(int value);
void on_pre1_clicked();
void on_next1_clicked();
void on_save1_clicked();
void on_brightness_btn_valueChanged(int value);
void on_constrast_btn_valueChanged(int value);
void on_hue_btn_valueChanged(int value);
void on_saturastion_btn_valueChanged(int value);
void on_pre1_2_clicked();
void on_next1_2_clicked();
void on_save1_2_clicked();
void on_rgain_btn_valueChanged(int value);
void on_grgain_btn_valueChanged(int value);
void on_gbgain_btn_valueChanged(int value);
void on_bgain_btn_valueChanged(int value);
void on_pre1_3_clicked();
void on_next1_3_clicked();
void on_save1_3_clicked();
void on_texturefreq_btn_valueChanged(int value);
void on_edgefreq_btn_valueChanged(int value);
void on_overshoot_btn_valueChanged(int value);
void on_undershoot_btn_valueChanged(int value);
void on_pre1_4_clicked();
void on_next1_4_clicked();
void on_save1_4_clicked();
void on_next1_5_clicked();
void on_save1_5_clicked();
void on_pre1_6_clicked();
void on_pre1_7_clicked();
void on_pre1_5_clicked();
void on_next1_6_clicked();
void on_save1_6_clicked();
void on_pushButton_Awb_clicked();
void play_number_pic(int num);
#endif
void * mainwindow_run(void *pArgs);
#endif // MAINWINDOW_H
